<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="title" @keyup.enter="query" placeholder="文件名">
            </div>
            <a class="btn btn-default" @click="query">查询</a>
			<#if shiro.hasPermission("onlinestudy:xcvideo:upload")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;上传</a>
			</#if>
			<#if shiro.hasPermission("onlinestudy:xcvideo:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default" align="center">
        <div class="panel-heading">{{tab_name}}</div>
        <form class="form-horizontal" style="width:70%!important;" id="uploadForm" enctype="multipart/form-data">
	            <div class="form-group">
	                <div class="col-sm-2 control-label" style="width: 10%;">标题</div>
	                <div class="col-sm-10" style="width: 40%;">
	                    <input type="text" name="title" class="form-control" width="80%" v-model="xcVideo.title" placeholder="标题"/>
	                </div>
                    <div class="col-sm-2 control-label" style="width: 10%;">描述</div>
                    <div class="col-sm-10" style="width: 40%;">
                        <input type="text" name="decribe" class="form-control" width="80%" v-model="xcVideo.decribe" placeholder="描述"/>
                    </div>
                </div>
	            <div class="form-group">
	                <div class="col-sm-2 control-label" style="width: 10%;">缩略图</div>
	                <div class="col-sm-10" style="width: 40%;">
	                    <input type="file" name="imageFile" class="form-control" width="80%" v-model="xcVideo.imageFile" placeholder="缩略图"/>
	                </div>
                    <div class="col-sm-2 control-label" style="width: 10%;">视频</div>
                    <div class="col-sm-10" style="width: 40%;">
                        <input type="file" id="videoFile" name="videoFile" class="form-control" width="80%" v-model="xcVideo.videoFile" placeholder="视频"/>
                    </div>
                </div>
	            <div class="form-group">
	                <!--<div class="col-sm-2 control-label" style="width: 10%;">录入时间</div>-->
	                <!--<div class="col-sm-10" style="width: 40%;">-->
	                    <!--<input type="text" class="form-control" width="80%" v-model="xcVideo.ldate" placeholder="录入时间"/>-->
	                <!--</div>-->
                    <div class="col-sm-2 control-label" style="width: 10%;">播放时长</div>
                    <div class="col-sm-10" style="width: 40%;">
                        <input type="number" name="bfsc" class="form-control" width="80%" v-model="xcVideo.bfsc" placeholder="播放时长"/>
                    </div>
                </div>

            <div class="progress progress-striped active">
                <div class="progress-bar" role="progressbar" aria-valuenow="60"
                     aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
                    <!--<span class="sr-only">等待上传...</span>-->
                </div>
            </div>

            <div class="form-group">
            	<div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="save" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/onlinestudy/xcvideo.js?_${.now?long}"></script>
</body>
</html>